﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack stack = new Stack();
            stack.Push("1：今天");
            stack.Push("2：依旧");
            stack.Push("3：可以");
            Console.WriteLine("输出数字");
            while (stack.Count != 0)
            {
                Console.WriteLine(stack.Pop());
            }

            Console.WriteLine();

            Stack stack1 = new Stack();
            stack1.Push("one");
            stack1.Push("two");
            stack1.Push("three");
            object[] arr = stack1.ToArray();
            foreach (var item in arr)
            {
                Console.WriteLine(item);
            }
        }
    }
}
